﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SRAGWMCLib.OO
{

    /// <summary>
    /// Contains the values that filter the features that display afterwards
    /// </summary>
    /// 

    public class Filter
    {
        
        /// <summary>
        /// Number of Pairs of Points
        /// </summary>

        public int NumPairs { get; set;}
        
        /// <summary>
        /// Sets if the features will touch or not the map, standard set as 4,
        /// for more info see the Geomedia Documentation.
        /// </summary>

        public int SpatialOperator { get; set;}             

        /// <summary>
        /// Used if a clause is to be added to the marker, 
        /// if none is to be set it is defined as ""
        /// </summary>

        public string WhereClause { get; set;}

        /// <summary>
        /// Pairs of X, Y to the used into the addElementsbyPolygon that, 
        /// later, fill the Rng
        /// </summary>

        public object[] Points { get; set;}
               
        /// <summary>
        /// Fills the Filter Class
        /// </summary>
        /// <param name="pWhereClause">If a clause is not to be added it is set as ""</param>
        /// <param name="pPoints">Pairs of X, Y</param>
        /// <param name="pNumPairs">Number of pairs of points</param>
        /// <param name="pSpatialOperator">Sets how the features interact with the map, 
        /// set as standard as 4</param>

        public Filter(string pWhereClause, object[] pPoints, int pNumPairs, int pSpatialOperator) 
        {
            WhereClause = pWhereClause;
            NumPairs = pNumPairs;
            SpatialOperator = pSpatialOperator;
            Points = pPoints;   
        }

    }
}
